import { http } from "@/utils/request.js";

/* 获取验证码 */
export const CodeAPI=(data)=>{
	return http.get('/code',{params:data})
}


/* 登录(验证码登录) */
export const CodeLoginAPI=(data)=>{
	return http.post('/login',data)
}


/* 获取用户信息 */
export const userInfoAPI = () => {
  return http.get('/patient/myUser')
}

/* 添加患者信息 */
export const addUserInfoAPI=(data)=>{
	return http.post('/patient/add',data)
}


/* 查询患者列表 */
export const showUserInfoAPI=()=>{
	return http.get('/patient/mylist')
}

/* 删除家属患者信息 */
export const deleteUserAPI=(id)=>{
	return http.delete(`/patient/del/${id}`)
}


/* 查询家属患者信息 */
export const askUserAPI=(id)=>{
	return http.get(`/patient/info/${id}`)
}

/* 编辑更新家属患者信息 */
export const ExitUserInfoAPI=(data)=>{
	return http.put('/patient/update',data)
}